package com.szh.zx.duoxiancheng.chapter1;

import java.util.ArrayList;

public class UnsaveList {
	public static void main(String[] args) {
		ArrayList<String> strings = new ArrayList<>();
		for (int i = 0; i < 100; i++) {
			new Thread(() -> {
				strings.add(Thread.currentThread().getName());
			}).start();


		}
		try {
			Thread.sleep(3000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		System.out.println(strings.size());
	}
}
